package com.karileet.nokia.meeting.profile;

import android.content.Context;
import android.content.SharedPreferences;

public class ProfileState {
	private boolean profileEnabled;
	private boolean vibrateEnabled;
	private Context ctx;
	
	public ProfileState(Context ctx) {
		this.ctx = ctx;
	}
	
	public boolean isProfileEnabled() {
		return profileEnabled;
	}
	public void setProfileEnabled(boolean profileEnabled) {
		SharedPreferences p = ctx.getSharedPreferences(MainActivity.PREFS_NAME, 0);
    	p.edit().putBoolean("profile", profileEnabled).commit();
		this.profileEnabled = profileEnabled;
	}
	public boolean isVibrateEnabled() {
		return vibrateEnabled;
	}
	public void setVibrateEnabled(boolean vibrateEnabled) {
		SharedPreferences p = ctx.getSharedPreferences(MainActivity.PREFS_NAME, 0);
		p.edit().putBoolean("vibrate", vibrateEnabled).commit();
		this.vibrateEnabled = vibrateEnabled;
	}
	
	
}
